﻿
{template header}

{template sidebar}

<!-- artile begin -->
<div class="article">
{template title}




    <!--{if $type ==  'storeTemplate'}-->
    <table cellpadding="1" cellspacing="1" border="0" width="100%">
        <tr>
            <td colspan="6">
                <label>
                  &nbsp;&nbsp;   &nbsp;&nbsp;  &nbsp;&nbsp; &nbsp;&nbsp;模版管理分为图片要求管理以及图片地址空间的管理，图片要求包括空间中各种类型图片的大小和尺寸的规范和
                    约定。 图片地址空间管理，是填写宝贝编辑图片公共信息图片的图片在淘宝空间的地址。
                </label>
            </td>
        </tr>

        <tr>
            <td class="td1" width="30%">模版名称：</td>
            <td class="td2" colspan="4">
                <!-- class="required" 必填字段  -->
                <select name="templateId">
                    <option value="1">模板一</option>
                    <option value="2">模板二</option>
                    <option value="3">模板三</option>
                </select>

            </td>

        </tr>

        <tr>
            <th width="15%">图片名称</th>
            <th width="20%">尺寸要求</th>
            <th width="15%">大小要求</th>
            <th width="15%">备注</th>
            <th width="15%">操作</th>


        </tr>

        <!--{if $result}-->
        <!--{loop $result $v}-->
        <tr>
            <td><input type="checkbox" name="id" value="{$v['id']}" /></td>
            <td>{$v['picName']}</td>
            <td>{$v['size']}</td>
            <td>{$v['fileSize']}</td>
            <td>{$v['comment']}</td>
            <td class="operate">
                <a href="{$this->url($c,'editStoreTemplate',array('id'=>$v['id']))}">自然属性</a>
                <a href="{$this->url($c,'delete',array('id'=>$v['id']))}">自然属性</a>
            </td>

        </tr>
        <!--{/loop}-->
        <!--{/if}-->

        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="6">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->

        <!--{if $result == 0}-->
        <tr>
            <td colspan="4">没有数据记录！</td>
        </tr>
        <!--{/if}-->

        <tr>
            <td colspan="4" class="td4">
                <a title="添加图片要求" class="btn btn-success " href="{$this->url($c,'addStoreTemplate',$result['id'])}">添加图片要求</a>
            </td>

        </tr>



    </table>
    <table cellpadding="1" cellspacing="1" border="0" width="100%">


        <tr>
            <th width="15%">图片名称</th>
            <th width="20%">图片地址</th>
            <th width="20%">操作</th>
            <th width="20%" colspan="2">备注</th>


        </tr>

        <!--{if $result}-->
        <!--{loop $result $v}-->
        <tr>
            <td><input type="checkbox" name="id" value="{$v['id']}" /></td>
            <td>{$v['picName']}</td>
            <td>{$v['size']}</td>
            <td>{$v['fileSize']}</td>
            <td>{$v['comment']}</td>
            <td class="operate">
                <a href="{$this->url($c,'editStoreTemplate',array('id'=>$v['id']))}">自然属性</a>
                <a href="{$this->url($c,'delete',array('id'=>$v['id']))}">自然属性</a>
            </td>

        </tr>
        <!--{/loop}-->
        <!--{/if}-->

        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="6">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->

        <!--{if $result == 0}-->
        <tr>
            <td colspan="4">没有数据记录！</td>
        </tr>
        <!--{/if}-->


        <tr>
            <td colspan="3" class="td4">
                <a title="添加图片空间地址" class="btn btn-success " href="{$this->url($c,'addPagePic',$result['id'])}">添加图片空间地址</a>
            </td>
        </tr>



    </table>

    <!--{/if}-->
    <!--{if $a == 'addPagePic' }-->
    <form method="post" action="{$this->url($c, 'savePagePic', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">

            <tr>
                <td class="td1" width="30%">模版名称：</td>
                <td class="td2" colspan="2">

                    <select name="templateId">
                        <option value="1">模板一</option>
                        <option value="2">模板二</option>
                        <option value="3">模板三</option>
                        <option value="4">模板四</option>
                        <option value="5">模板五</option>
                        <option value="6">模板六</option>
                    </select>

                </td>
            <tr>
                <td class="td1" width="30%">图片名称：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="pagePicName" placeholder="请输入图片名称" class="required" value="{$a == 'edit' ? $result['pagePicName'] : ''}" />

                </td>
        </tr>
        <tr>
                <td class="td1" width="30%">淘宝地址：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="pagePicUrl" placeholder="请输入淘宝地址" class="required" value="{$a == 'edit' ? $result['pagePicUrl'] : ''}" />

                </td>
        </tr>
        <tr>
            <td class="td1" width="30%">页面位置：</td>
            <td class="td2" colspan="4">
                <select name="pagePosition" >
                    <option value="100">位置一</option>
                    <option value="200">位置二</option>
                    <option value="300">位置三</option>
                    <option value="400">位置四</option>
                    <option value="500">位置五</option>
                    <option value="600">位置六</option>
                    <option value="700">位置七</option>
                    <option value="800">位置八</option>
                    <option value="900">位置九</option>
                </select>
            </td>
        </tr>

            <tr>
                <td colspan="2" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="2" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->


    <!--{if $a == 'editStoreTemplate' || $a == 'addStoreTemplate'}-->
    <form method="post" action="{$this->url($c, 'saveStoreTemplate', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">

            <tr>
                <td class="td1" width="30%">模版名称：</td>
                <td class="td2" colspan="2">

                    <select name="templateId">
                        <option value="1">模板一</option>
                        <option value="2">模板二</option>
                        <option value="3">模板三</option>
                    </select>

                </td>
            <tr>
                <td class="td1" width="30%">图片名称：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="picName" placeholder="请输入图片名称" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">尺寸要求：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="size" placeholder="请输入尺寸要求" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>
            <tr>
                <td class="td1" width="30%">大小要求：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="fileSize" placeholder="请输入大小要求" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">备注：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="comment" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>

            </tr>

            <tr>
                <td colspan="2" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="2" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

    <!--{if $type ==  'logistics'}-->

    <!-- 物流信息  -->
    <table cellpadding="1" cellspacing="1" border="0" width="100%">


        <tr>
            <td class="td1" width="30%" colspan="2">物流公司名称：</td>
            <td class="td2" colspan="3">
                <!-- class="required" 必填字段  -->
                <input type="text" size="40" name="title" placeholder="请输入模版名称" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

            </td>
            <td><a title="查询" class="btn btn-success save" href="{$this->url($c)}">查询</a></td>
        </tr>

        <tr>
            <th width="15%" colspan="2">公司名称</th>
            <th width="20%">联系人</th>
            <th width="15%">联系电话</th>
            <th width="15%" colspan="2">地址</th>


        </tr>

        <!--{if $result}-->
        <!--{loop $result $v}-->
        <tr>
            <td><input type="checkbox" name="id" value="{$v['id']}" /></td>
            <td>{$v['title']}</td>
            <td>{$v['type']}</td>
            <td>{$v['url']}</td>
            <td>{$v['address']}</td>
            <td class="operate"><a href="">删除</a></td>
        </tr>
        <!--{/loop}-->
        <!--{/if}-->

        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="6">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->

        <!--{if $result == 0}-->
        <tr>
            <td colspan="6">没有数据记录！</td>
        </tr>
        <!--{/if}-->


        <tr>
            <td colspan="6" class="td4">
                <a title="添加物流公司" class="btn btn-success" href="{$this->url($c,'addLogistic')}">添加物流公司</a>
            </td>
        </tr>


    </table>


    <!--{/if}-->

    <!--{if $a == 'editLogistic' || $a == 'addLogistic'}-->

    <form method="post" action="{$this->url($c, 'saveLogistic', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <td class="td1" width="30%">公司名称：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="companyName" placeholder="请输入图片名称" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">联系人：</td>
                <td class="td2" colspan="4">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="contactPersonName" placeholder="请输入联系人姓名" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>
            <tr>
                <td class="td1" width="30%">联系电话：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="phone" placeholder="请输入联系电话" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">地  址：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="addr" placeholder="请输入地址" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>
            <tr>
                <td class="td1" width="30%">首重价格：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaPrice1" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重城市：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaCity1" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重公斤数：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaKgs1" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>


            <tr>
                <td class="td1" width="30%">首重价格：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaPrice2" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重城市：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaCity2" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重公斤数：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaKgs2" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>


            <tr>
                <td class="td1" width="30%">首重价格：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaPrice3" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重城市：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaCity3" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重公斤数：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaKgs3" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>


            <tr>
                <td class="td1" width="30%">首重价格：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaPrice4" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重城市：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaCity4" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">首重公斤数：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="metaKgs4" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>

            <tr>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

    <!--{if $type ==  'size'}-->

    <!-- 尺码信息  -->

    <div class="view">
        <h1>筛选</h1>
        <ul>
            <li>
                <span>服装类型：</span>
                <!--{loop $this->clothType $k $v}-->
                <a href="{$this->url($c, lookStdSize, array('key1' => $k ))}">{$v}</a>
                <!--{/loop}-->
            </li>
        </ul>
    </div>
    <table cellpadding="1" cellspacing="1" border="0" width="100%">




        <tr>
            <!--{loop $title $v}-->
            <th width="15%">{$v}</th>
            <!--{/loop}-->
            <th>操作</th>

        </tr>

        <!--{if $result}-->
        <!--{loop $result  $v}-->
        <tr>

            <td>{$v[0]}</td>
            <td>{$v[1]}</td>
            <td>{$v[2]}</td>
            <td>{$v[3]}</td>
            <td>{$v[4]}</td>
            <td class="operate">
                <a href="{$this->url($c,'edit',array('id'=>$v['id']))}">编辑</a>
                <a title="删除" class="del" href="{$this->url($c,'del',array('id'=>$v['id']))}">删除</a>
            </td>
        </tr>
        <!--{/loop}-->


        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="6">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->

        <!--{else}-->
        <tr>
            <td colspan="6">没有数据记录！</td>
        </tr>
        <!--{/if}-->


        <tr>
            <td colspan="6" class="td4">
                <a title="添加尺码信息" class="btn btn-success " href="{$this->url($c,'addSize')}">添加尺码信息</a>
            </td>
        </tr>
        <tr>

            <td  colspan="6">
                <img src="themes/admin/images/measure.bmp" height="500" width="700">

            </td>

        </tr>


    </table>
    <!--{/if}-->
    <!--{if $a == 'editSize' || $a == 'addSize'}-->
    <form method="post" action="{$this->url($c, 'saveSize', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <td class="td1" width="30%">身高：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="请输入图片名称" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%" colspan="">年龄：</td>
                <td class="td2" colspan="3">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="请输入尺寸要求" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
            </tr>
            <tr>
                <td class="td1" width="30%">单数尺码：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="请输入大小要求" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">双数尺码：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">胸围：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">腰围：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="请输入大小要求" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">臀围：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">肩宽：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">袖长：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="请输入大小要求" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">裤长：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>
                <td class="td1" width="30%">衣长：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="20" name="title" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

                </td>

            </tr>

            <tr>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

    <!--{if $type ==  'materials'}-->
    <!-- 店装素材信息 -->

    <table cellpadding="1" cellspacing="1" border="0" width="100%">


        <tr>
            <td class="td1" width="30%">请选择素材类型：</td>
            <td class="td2" colspan="2">
                <!-- class="required" 必填字段  -->

                <!--  <input type="text" name="discount" placeholder="请输入供货商折扣信息" value="{$a == 'edit' ? $result['discount'] : ''}" />  -->




                <select name="materialType" onchange="template(this.value)">
                    <!--{loop $this->storeMateriaType  $k $v}-->
                    <option value="{$k}" {$k == $t?'selected':''}>{$v}</option>
                    <!--{/loop}-->

                </select>
                <script>
                    function template( v ) {
                        var url = "{$this->url($c,'lookStorePic',array('type'=>G('type')))}";
                        window.location.href = url + "&t=" + v;
                    }
                </script>

            </td>
            <td class="operate">
                <a class="view" href="{$this->url($c,'addMaterials',array('type'=>G('type')))}">添加店装素材</a>

            </td>
        </tr>
        </table>

     <table>
        <!--{if  $result}-->
        <!--{loop $result $val}-->
         <!--{if $t ==  2}-->
        <tr>
            <td width="100" align =center>图片编号：{$val['picNo']}</td>
            <td width="100">图片描述：{$val['detail']}</td>
        </tr>
         <tr>
             <td  colspan=2><IMG src="{$val['picAddr']}" width="600" height="400"></td>
         </tr>
         <!--{/if}-->
         <!--{if $t ==  14}-->
         <tr>
             <td width="100" align =center>图片编号：{$val['picNo']}</td>
             <td width="100">图片描述：{$val['detail']}</td>
         </tr>
         <tr>
             <td  colspan=2><IMG src="{$val['picAddr']}" width="720" height="60"></td>
         </tr>
         <!--{/if}-->

        <!--{/loop}-->
            <!--{else}-->
        <tr>
            <td colspan="6">图片装修素材信息</td>
        </tr>
        <!--{/if}-->

        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="6">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->



    </table>
    <!--{/if}-->
    <!--{if $type ==  'editMaterials' || $a == 'addMaterials'}-->
    <form method="post" action="{$this->url($c, 'saveStoreMaterials', array('id' => $result['id']) )}">
        <input type="hidden" name="attach[id]" value="" />
        <table cellpadding="1" cellspacing="1" border="0" width="100%">
            <tr>
                <td class="td1" width="25%">图片编号：</td>
                <td class="td2 operate">
                    <input type="text" name="picNo" placeholder="请输入商品编号" class="required" value="{$a == 'edit' ? $result['sn'] : ''}"/>
                    <a format="YmdHis" class="sn" href="{$this->url($c,'addMaterials',array('type'=>'materials'))}">自动生成</a>
                </td>
            </tr>
            <tr>
                <td class="td1" width="30%">图片类型：</td>
                <td class="td2">
                    <select name="picType">

                        <!--{loop $this->storeMateriaType  $k $v}-->
                        <option value="{$k}">{$v}</option>
                        <!--{/loop}-->

                    </select>
                </td>


            </tr>
            <td class="td1" width="30%">细节描述：</td>
            <td class="td2">
                <!-- class="required" 必填字段  -->
                <input type="text" size="20" name="detail" placeholder="" class="required" value="{$a == 'edit' ? $result['title'] : ''}" />

            </td>
            <tr>

            </tr>
            {template upload}

            <tr>
                <td colspan="1" class="td1">
                    <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->




</div>
<!-- artile end -->
{template footer}